module.exports = () => {
  return async function notFoundHandler(ctx, next) {
    await next();

    console.log('notFoundHandler next 后面');

    console.log('返回');
    console.log(ctx);
    console.log(ctx.status);
    
    if (ctx.status === 404) {
        ctx.body = '<h1>接口不存在</h1>';
    } else if (ctx.status === 400 && !ctx.body){
      ctx.body = {
          errmsg : 'body params error, context:' + ctx.body,
          errcode : 10014,
      };
    }
  };
};